package com.eastjet.maintenance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 执行规则表
 * @TableName device_execution
 */
@TableName(value ="device_execution")
@Data
public class DeviceExecution implements Serializable {
    /**
     * 执行规则编号
     */
    @TableId(type = IdType.AUTO)
    private Integer executionId;

    /**
     * 执行规则名称
     */
    private String executionName;

    /**
     * 执行类型(0-小时 1-日 2-周 3-月 4-季 5-年)
     */
    private String executionType;

    /**
     * 执行频率
     */
    private String executionFrequency;

    /**
     * 执行间隔
     */
    private String executionInterval;

    /**
     * 执行状态(0-启用 1-禁用)
     */
    private Integer executionState;

    /**
     * 执行规则描述
     */
    private String executionDescribe;

    /**
     * 执行时间(1.灵活时间,同一时间,3.时间段)
     */
    private String executionTime;

    /**
     * 创建人
     */
    private String insertPerson;

    /**
     * 创建时间
     */
    private Date insertTime;

    /**
     * 更新人
     */
    private String updatePerson;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceExecution other = (DeviceExecution) that;
        return (this.getExecutionId() == null ? other.getExecutionId() == null : this.getExecutionId().equals(other.getExecutionId()))
            && (this.getExecutionName() == null ? other.getExecutionName() == null : this.getExecutionName().equals(other.getExecutionName()))
            && (this.getExecutionType() == null ? other.getExecutionType() == null : this.getExecutionType().equals(other.getExecutionType()))
            && (this.getExecutionFrequency() == null ? other.getExecutionFrequency() == null : this.getExecutionFrequency().equals(other.getExecutionFrequency()))
            && (this.getExecutionInterval() == null ? other.getExecutionInterval() == null : this.getExecutionInterval().equals(other.getExecutionInterval()))
            && (this.getExecutionState() == null ? other.getExecutionState() == null : this.getExecutionState().equals(other.getExecutionState()))
            && (this.getExecutionDescribe() == null ? other.getExecutionDescribe() == null : this.getExecutionDescribe().equals(other.getExecutionDescribe()))
            && (this.getExecutionTime() == null ? other.getExecutionTime() == null : this.getExecutionTime().equals(other.getExecutionTime()))
            && (this.getInsertPerson() == null ? other.getInsertPerson() == null : this.getInsertPerson().equals(other.getInsertPerson()))
            && (this.getInsertTime() == null ? other.getInsertTime() == null : this.getInsertTime().equals(other.getInsertTime()))
            && (this.getUpdatePerson() == null ? other.getUpdatePerson() == null : this.getUpdatePerson().equals(other.getUpdatePerson()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getExecutionId() == null) ? 0 : getExecutionId().hashCode());
        result = prime * result + ((getExecutionName() == null) ? 0 : getExecutionName().hashCode());
        result = prime * result + ((getExecutionType() == null) ? 0 : getExecutionType().hashCode());
        result = prime * result + ((getExecutionFrequency() == null) ? 0 : getExecutionFrequency().hashCode());
        result = prime * result + ((getExecutionInterval() == null) ? 0 : getExecutionInterval().hashCode());
        result = prime * result + ((getExecutionState() == null) ? 0 : getExecutionState().hashCode());
        result = prime * result + ((getExecutionDescribe() == null) ? 0 : getExecutionDescribe().hashCode());
        result = prime * result + ((getExecutionTime() == null) ? 0 : getExecutionTime().hashCode());
        result = prime * result + ((getInsertPerson() == null) ? 0 : getInsertPerson().hashCode());
        result = prime * result + ((getInsertTime() == null) ? 0 : getInsertTime().hashCode());
        result = prime * result + ((getUpdatePerson() == null) ? 0 : getUpdatePerson().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", executionId=").append(executionId);
        sb.append(", executionName=").append(executionName);
        sb.append(", executionType=").append(executionType);
        sb.append(", executionFrequency=").append(executionFrequency);
        sb.append(", executionInterval=").append(executionInterval);
        sb.append(", executionState=").append(executionState);
        sb.append(", executionDescribe=").append(executionDescribe);
        sb.append(", executionTime=").append(executionTime);
        sb.append(", insertPerson=").append(insertPerson);
        sb.append(", insertTime=").append(insertTime);
        sb.append(", updatePerson=").append(updatePerson);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}